<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>Document</title>
	<script src="vue.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	<div id="box">
		<form action=" " method="post" v-on:submit.prevent="tj">
			<input type="text"  v-model="username" />
			{{  username }}
			<input type="submit"  />
		</form>
	</div>
</body>
<script type="text/javascript">
	var vm = new Vue({
		el:"#box",
		data:{
			username:"张三"
		},
		methods:{
			tj:function(){
				alert( this.username )
			}
		}
	})
</script>
</html>